import type { FormRules } from 'element-plus';

export const rules: FormRules = {
  phone: [
    { required: true, message: '手机号不能为空', trigger: 'blur' },
    {
      pattern: /^1[3|4|5|7|8][0-9]{9}$/,
      message: '手机号输入错误',
      trigger: 'blur'
    }
  ],
  code: [
    {
      required: true,
      message: '密码不能为空',
      trigger: 'blur'
    },
    {
      pattern: /^\d{6}$/,
      message: '验证码输入错误',
      trigger: 'blur'
    }
  ]
};
